Skip to content

Conversation

@akramsdm
Copy link
Contributor

@akramsdm akramsdm commented Jan 4, 2026

Description:
Rename the advanced issue guard script to align with the workflow naming
and improve maintainability as the number of GitHub workflows grows.

  • Rename .github/scripts/check_advanced_requirement.sh to bot-advanced-check.sh
  • Update .github/workflows/bot-advanced-check.yml to reference the new script name

Related issue(s):
Fixes #1341

Notes for reviewer:
This change is a rename only and introduces no functional behavior changes.
Existing CI workflows validate the update.

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

Adds a new GitHub Actions helper script .github/scripts/bot-advanced-check.sh that validates issue assignee qualification via role checks and repository issue-label counts, updates the workflow .github/workflows/bot-advanced-check.yml to run the renamed script, and records the rename in CHANGELOG.md.

Changes

Cohort / File(s) Summary
GitHub Automation Script
\.github/scripts/bot-advanced-check.sh
New Bash script implementing qualification checks: validates required env vars, detects core-member roles, queries GitHub for closed issues labeled Good First Issue and intermediate assigned to a user, comments on issues and unassigns users when not qualified; includes safe API handling, numeric parsing, and a log() helper.
Workflow
\.github/workflows/bot-advanced-check.yml
Updated workflow step to chmod +x and execute the renamed script bot-advanced-check.sh instead of the previous check_advanced_requirement.sh.
Changelog
CHANGELOG.md
Added Unreleased entry documenting the rename from check_advanced_requirement.sh to bot-advanced-check.sh.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Actions as GitHub Actions
  participant Script as bot-advanced-check.sh
  participant API as GitHub REST API
  Note over Actions,Script: Workflow runs verification step
  Actions->>Script: run bot-advanced-check.sh (env: REPO, ISSUE_NUMBER, GH_TOKEN, TRIGGER_ASSIGNEE?)
  Script->>API: GET /repos/:owner/:repo/issues/:issue_number  (fetch assignees)
  API-->>Script: assignees list
  alt TRIGGER_ASSIGNEE set
    Script->>API: GET /search/issues?q=assignee:TRIGGER_ASSIGNEE+label:"Good First Issue"
    API-->>Script: countA
    Script->>API: GET /search/issues?q=assignee:TRIGGER_ASSIGNEE+label:intermediate
    API-->>Script: countB
  else iterate assignees
    loop per assignee
      Script->>API: GET /search/issues?q=assignee:<user>+label:"Good First Issue"
      API-->>Script: countA
      Script->>API: GET /search/issues?q=assignee:<user>+label:intermediate
      API-->>Script: countB
    end
  end
  alt counts meet threshold OR user is core member
    Script-->>Actions: no action (qualified)
  else not qualified
    Script->>API: POST /repos/:owner/:repo/issues/:issue_number/comments (tailored message)
    API-->>Script: comment created
    Script->>API: DELETE /repos/:owner/:repo/issues/:issue_number/assignees (unassign user)
    API-->>Script: unassign confirmed
  end
  Note over Script,API: script logs actions and handles errors / numeric parsing
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: renaming check_advanced_requirement.sh to bot-advanced-check.sh, and is clear, concise, and directly related to the changeset.
Description check ✅ Passed The description clearly explains the rationale for the rename (workflow naming consistency and maintainability), lists the specific files changed, and notes that this is a rename-only change with no functional modifications.
Linked Issues check ✅ Passed The pull request fully addresses all coding requirements from #1341: the script file is renamed, the workflow file is updated to reference the new script name, and a changelog entry is added.
Out of Scope Changes check ✅ Passed All changes are directly related to the stated objective of renaming the script and updating references; no unrelated modifications are present in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f1ed33 and 0297acc.

📒 Files selected for processing (3)
  • .github/scripts/bot-advanced-check.sh
  • .github/workflows/bot-advanced-check.yml
  • CHANGELOG.md
🧰 Additional context used
📓 Path-based instructions (2)
.github/workflows/**/*

⚙️ CodeRabbit configuration file

.github/workflows/**/*: Review workflows as security-sensitive infrastructure.

A good workflow is small, focused, and boring.
If a workflow is clever, generic, or overly flexible, it is a risk.


PRIORITY 0 — ABSOLUTE REQUIREMENTS

  • All third-party actions MUST be pinned to full commit SHAs, similar to other workflows.
  • permissions: MUST be explicitly declared and minimally scoped.
  • Workflows MUST behave safely when executed from forks.
  • YAML MUST orchestrate steps, not implement business logic.
  • Any workflow that mutates GitHub state MUST support dry-run mode.
  • Dry-run behavior must be explicit and visible in logs.
  • Workflows MUST NOT modify repository source code outside .github/.

PRIORITY 1 — SCOPE, FOCUS & RESTRAINT

  • The title of each workflow must be relevant, match similar naming schemes, and match its script filename.
  • Each workflow MUST have a single, clearly defined objective and SHOULD document this in a top-level comment.
  • Flag workflows that:
    • Attempt to be generic “frameworks”
    • Include speculative or future-facing logic
    • Perform actions unrelated to the stated goal
  • Over-abstraction and excess flexibility are maintenance risks.

PRIORITY 2 — INPUT HARDENING

  • Treat ALL GitHub event data as potentially hostile input, including:
    • issue titles, bodies, and comments
    • labels, usernames, branch names
  • Free-form user input MUST NOT be passed directly into:
    • shell commands
    • gh CLI arguments
    • Node.js exec / spawn calls
  • Require strict allowlists or exact string matches.
  • Flag any use of:
    • eval or bash -c
    • backticks or $(...) with user-controlled input

------------------...

Files:

  • .github/workflows/bot-advanced-check.yml
.github/scripts/**/*.sh

⚙️ CodeRabbit configuration file

.github/scripts/**/*.sh: Treat shell scripts as production-grade automation.

Scripts should be small, focused, and explicit.
Avoid “do-everything” or overly generic scripts.

  • MUST use: set -euo pipefail
  • MUST validate all required environment variables
  • MUST defensively quote variables
  • MUST validate all untrusted input
  • MUST have bounded loops and pagination
  • MUST support dry-run mode if state is mutated
  • MUST log key decisions and early exits

Files:

  • .github/scripts/bot-advanced-check.sh
🧬 Code graph analysis (1)
.github/scripts/bot-advanced-check.sh (1)
.github/scripts/linked_issue_enforce.js (1)
  • assignees (14-14)
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~717-~717: The official name of this software platform is spelled with a capital “H”.
Context: ...### Removed - N/A ### Changed - Renamed .github/scripts/check_advanced_requirement.sh ...

(GITHUB)

🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

716-716: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


716-716: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


716-716: Multiple headings with the same content

(MD024, no-duplicate-heading)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
.github/workflows/bot-advanced-check.yml (1)

37-38: Script reference updated correctly.

The workflow now correctly references the renamed script bot-advanced-check.sh, maintaining consistency between the workflow filename and its primary script. The workflow follows best practices with pinned action SHA, minimal permissions, and concurrency control.

.github/scripts/bot-advanced-check.sh (2)

1-13: Good defensive setup with proper shell options and env validation.

The script correctly uses set -euo pipefail and validates all required environment variables upfront. The log helper provides consistent output formatting.


73-93: Main logic handles both trigger modes correctly.

The script properly handles the single-assignee trigger case (TRIGGER_ASSIGNEE) and falls back to checking all current assignees. The use of a here-string (<<<) for iteration is a good practice that avoids subshell variable scope issues.

@akramsdm akramsdm changed the title Issue 1341 rename advanced requirements chore: rename check_advanced_requirement.sh to bot-advanced-check.sh #1341 Jan 4, 2026
@exploreriii exploreriii marked this pull request as draft January 4, 2026 19:38
@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@akramsdm akramsdm marked this pull request as ready for review January 5, 2026 06:56
Copy link
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! final step now please!

@exploreriii exploreriii marked this pull request as draft January 5, 2026 09:21
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Hi, this is MergeConflictBot.
Your pull request cannot be merged because it contains merge conflicts.

Please resolve these conflicts locally and push the changes.

To assist you, please read:

Thank you for contributing!

@akramsdm akramsdm marked this pull request as ready for review January 5, 2026 11:19
@akramsdm akramsdm requested a review from exploreriii January 5, 2026 11:33
@exploreriii exploreriii requested a review from a team January 5, 2026 18:12
Copy link
Contributor

@tech0priyanshu tech0priyanshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for contribution @akramsdm

Copy link
Member

@AntonioCeppellini AntonioCeppellini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @akramsdm, thanks for your contribution! Good job :D

@exploreriii
Copy link
Contributor

Hi @akramsdm this is approved thank you all
But you have a merge conflict
Would you like to resolve it, or should I do it for you here? In which case we would be joint contirbutors.

Copy link
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the merge conflict 👍

@exploreriii exploreriii marked this pull request as draft January 6, 2026 00:09
Copy link
Contributor

@aceppaluni aceppaluni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akramsdm This is great work 👍

Please let us know if you need assistance with the merge conflict.

Thank you so much for your contribution!!

@akramsdm
Copy link
Contributor Author

akramsdm commented Jan 8, 2026

Thank you so much, @aceppaluni.
I really appreciate the support, and apologies for the late response.
Please I need any assistance with the merge conflict.

@exploreriii
Copy link
Contributor

Hi @akramsdm yes! they can be tricky
The online editor is much easier to use
I see you have resolved it now, congratulations, will approve and merge this shortly

@exploreriii exploreriii marked this pull request as ready for review January 8, 2026 09:17
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1353   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files         139      139           
  Lines        8528     8528           
=======================================
  Hits         7884     7884           
  Misses        644      644           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c38d90c and e2828ab.

📒 Files selected for processing (1)
  • CHANGELOG.md
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~94-~94: The official name of this software platform is spelled with a capital “H”.
Context: ...pam list updates. ### Changed - Renamed .github/scripts/check_advanced_requirement.sh ...

(GITHUB)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-and-test (3.10)
  • GitHub Check: build-and-test (3.13)
  • GitHub Check: build-and-test (3.11)
  • GitHub Check: build-and-test (3.12)
  • GitHub Check: run-examples
  • GitHub Check: Codacy Static Code Analysis

@akramsdm
Copy link
Contributor Author

akramsdm commented Jan 8, 2026

@exploreriii thanks,
I appreciate your support and guidance!

@exploreriii exploreriii merged commit edf4d5a into hiero-ledger:main Jan 8, 2026
17 of 18 checks passed
@exploreriii
Copy link
Contributor

You're very welcome, if you want to try something similar but slightly more challenging, we have a few beginner issues available:
https://github.com/hiero-ledger/hiero-sdk-python/issues?q=is%3Aissue%20state%3Aopen%20label%3Abeginner%20no%3Aassignee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good First Issue]: Rename .github/scripts/check_advanced_requirement.sh to bot-advanced-check.sh

6 participants